I have a view assembling data from various tables:
Create View Test_View
As
Select
t1.Id as 'Id'
,t2.Flag as 'IsChecked'
etc. In the previous versions of this table, that Flag value had the values 'Yes' and 'No', and now it has been changed to bools, like it should be.
However, the application that uses this view needs to see the 'Yes' and 'No' values, not 1 and 0. What is the syntax for changing that view to return the string 'Yes' if t2.Flag is 1 and 'No' if t2.Flag is 0?