Q&A for those involved in the field of teaching Computer Science
create table #CheckTest( name varchar(50) ) if (select case when (select count(*) from #CheckTest) = 0 then 1 else 0 end + (select count(*) from #CheckTest where name = 'test') ) > 0 begin select 'fail' end else begin select 'success' end