title: case subquery in sql server 2008
body: <p>the followings statements gives an error</p>
  
  <p><strong>print (case 
          when exists (select count(*) from tblCustomerProductsDiscount PD where PD.cust_ID=138 and PD.pack_detl_ID = 1) then 0 end)</strong></p>
  
  <p><em>Error:</em> 
  Subqueries are not allowed in this context. Only scalar expressions are allowed.</p>