Good day,
I am attempting to pull 3 characters from a string [datatype nvarchar(25)], then compare those 3 characters to an 'in', and if the result is true, it should return a string.
Here is the code:
,case
when [column1] = 'this'
and [column2] is null
and substring([column3], 1, 3) in ('that','those','things')
then 'different_thing'
else [column1] end as [column4]