sql server inline if statement code example Example: sql query inline if case MyFlag when 1 then 'Yes' else 'No' end