Can you not move your CASE expression into the ORDER BY clause?