Custom order by in SQL server like P, A, L, H [closed] Custom order by in SQL server like P, A, L, H [closed] sql-server sql-server

Custom order by in SQL server like P, A, L, H [closed]


SELECT * FROM CustomersORDER BY case when country = 'P' then 1              when country = 'A' then 2              when country = 'L' then 3              when country = 'H' then 4              else 5         end asc