CASE used in SELECT clause
CASE
used in
SELECT
statement determines student's gender based
gender_id
column
SELECT
    id,
    first_name,
    CASE gender
    	WHEN 1 THEN 'Male'
    	WHEN 2 THEN 'Female'
        ELSE 'Undefined'
    END AS student_gender
FROM students
by Valeri Tandilashvili
4 years ago
MySQL
CASE
1
Pro tip: use ```triple backticks around text``` to write in code fences