MySQL : order by FIELD(col, val1, val2, ...) PostgreSQL : order by array_position(ARRAY[val1, val2, val3, ... ], col::TYPE)
출처 : https://yahwang.github.io/posts/51