EXAMPLE - EXCLUDES EXPRESSION
EXAMPLE - EXCLUDES EXPRESSIONYou could use the CASE function in a SQL statement where the expression is omitted.
In this CASE function example, an expression has not been included so each condition is individually evaluated and can be completely different and unique. When a condition is met, the corresponding value would be returned.
SELECT CASE WHEN a < b THEN 1 WHEN supplier_type = 'clothing' THEN 2 ELSE 3 END FROM suppliers;
Read more: MYSQL: CASE FUNCTION