Question : snytax error

Where is the snytax error on this?
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
insert into tblmail(sendTo, sendBcc, [subject], Note)
				select '[email protected]', 'sd@sdf','Account Canceled',					
					 
                    case (select refund from #temp)
						when  refund > 0  then cast(@custID as varchar) + ' has been cancelled, refund amount $' + refund + ' by ' + (select displayName from tblAd where id = @adID) + '.'
						else cast(@custid as varchar) + ' has been cancelled with no refund ' + ' by ' + (select displayName from tblAd where id = @adID) + '.'
					end

Answer : snytax error

insert into tblmail(sendTo, sendBcc, [subject], Note)
select '[email protected]', 'sd@sdf','Account Canceled',                          
case WHEN EXISTS (select 1 from #temp where  refund > 0 )
        then cast(@custID as varchar) + ' has been cancelled, refund amount $' + refund + ' by ' + (select displayName from tblAd where id = @adID) + '.'
        else cast(@custid as varchar) + ' has been cancelled with no refund ' + ' by ' + (select displayName from tblAd where id = @adID) + '.'
  end
Random Solutions  
 
programming4us programming4us