문제 링크 - https://school.programmers.co.kr/learn/courses/30/lessons/59409
SELECT ANIMAL_ID, NAME, CASE WHEN SEX_UPON_INTAKE LIKE 'NE%' THEN 'O' WHEN SEX_UPON_INTAKE LIKE 'Sp%' THEN 'O' ELSE 'X' END AS '중성화'
FROM ANIMAL_INS
ORDER BY ANIMAL_ID
# SELECT ANIMAL_ID, NAME, CASE WHEN SEX_UPON_INTAKE LIKE 'NE%' OR SEX_UPON_INTAKE LIKE 'Sp%' THEN 'O' ELSE 'X' END AS '중성화'
# FROM ANIMAL_INS
# ORDER BY ANIMAL_ID
CASE
WHEN 조건
THEN 반환값
WHEN 조건
THEN 반환값
...
ELSE WHEN 조건에 해당되지 않는 경우 반환값
END