Reputation: 21499
I have a result set like this: a b c
This result will be fixed each time. What I need to do is order the rows like this a c b. How can I do that ?
Upvotes: 2
Views: 97
Reputation: 425713
SELECT value
FROM mytable
ORDER BY
CASE value WHEN 'a' THEN 1 WHEN 'c' THEN 2 WHEN 'b' THEN 3 END
Upvotes: 4