以下で試すことができます:
SELECT CASE
WHEN @condition=1 THEN 'if result'
WHEN @condition=0 THEN 'elseif result'
ELSE 'else result'
END AS res;
以下で試すことができます:
SELECT CASE
WHEN @condition=1 THEN 'if result'
WHEN @condition=0 THEN 'elseif result'
ELSE 'else result'
END AS res;