I have a MySQL query .I want to set column hours=0 when the sub task is 'PTO'.I tried below query but it is not working as expected.
select distinct t.hours, t.subtask,
CASE sub task
WHEN 'PTO' THEN t.hours=0
ELSE t.hours
END as subtask
from task t