SQL - CASE Expressions
Consider the table
Products with column category having values 'Electronics', 'Clothing', 'Books'. What will be the order of categories after this query?SELECT category FROM Products ORDER BY CASE WHEN category = 'Books' THEN 3 WHEN category = 'Electronics' THEN 1 ELSE 2 END;