Here is how you can do it.Select Casewhen HR.PREM_CUR_QUOTED_AM <> 0 and HR.PREM_LOST_AUTO_AM <> 0 and HR.PREMIUM_BOUND_AM <> 0 and HR.PREMIUM_BOUND_AM <> 0THen 0 else 1end Cur_checkfrom dbo.THIT_RATIO_DETL HRWhereCasewhen HR.PREM_CUR_QUOTED_AM <> 0 and HR.PREM_LOST_AUTO_AM <> 0 and HR.PREMIUM_BOUND_AM <> 0 and HR.PREMIUM_BOUND_AM <> 0THen 0 else 1end = 1
Why are you doing it this way, however? Could you not do:Select 1 As cur_checkFrom dbo.THIT_RATIO_DETL HRWhere HR.PREM_CUR_QUOTED_AM <> 0 And HR.PREM_LOST_AUTO_AM <> 0 And HR.PREMIUM_BOUND_AM <> 0 And HR.PREMIUM_BOUND_AM <> 0