Can You Use CASE Statement In Order By Clause In SQL Server?
Can You Use CASE Statement In Order By Clause In SQL Server? Can you use CASE statement in order by clause in SQL Server? Although it is most often used there, CASE is not limited to SELECT statements. For example, you can use it in clauses like IN , WHERE , HAVING , and ORDER