I am using following for select statement with case. The column to which the CASE is applied has True, False and Null values. I am trying to display True for True and False for both False and Null. But it give me an error message saying:
"Conversion failed when converting the varchar value 'Null' to data type bit."
This is my query:
case
when prog.has_post_calc_screen = ''True'' then ''True''
when prog.has_post_calc_screen = ''False''then ''False''
when prog.has_post_calc_screen = ''Null'' then ''False''
End as Referal_ID,
Input which I am giving is:
'1','ALL', 'ALL'