if(조건, 조건 충족할 때, 조건 충족 못할 때)
select restaurant_name,
cuisine_type "원래 음식 타입",
if(cuisine_type='Korean', '한식', '기타') "음식 타입"
from food_orders

조건을 두 개 이상 지정하는 경우 (= if 문을 여러번 쓴 효과)
case when 조건1 then 값(수식)1
when 조건2 then 값(수식)2
else 값(수식)3
end
select order_id,
price,
quantity,
case when quantity=1 then price
when quantity>=2 then price/quantity end "음식 단가"
from food_orders
++
null이 있을때, 다른 값으로 출력하는 함수
IFNULL(컬럼명, null일 경우 대체 값)
select ifnull(name, "No name") as NAME
from animal_ins
// name 컬럼에 null이 있을 경우, "No name"을 출력, null이 아닌 경우 name 컬럼 출력