title: CASE Statement to Update Query Error
body: <p>I am using the CASE statement to Update some table data but its giving error incorrect error in WHEN  and THEN Condition.any body can tell whats wrong with this.here is my code,   </p>
  
  <pre><code>UPDATE TBL_AMOUNT_SETTING 
  SET CALCULATED_AMOUNT =
          CASE
             WHEN EXISTS(SELECT COUNT(*) 
                         FROM TBL_GAME_PRICE_BY_DATE 
                         WHERE GAMEPRICE_DATE = CONVERT(DATE,GETDATE())) 
               THEN 
                  (SELECT GAMEPRICE 
                   FROM TBL_GAME_PRICE_BY_DATE 
                   WHERE GAMEID = 10 
                     AND GAMEPRICE_DATE = CONVERT(DATE,GETDATE()))
             ELSE NULL
          END
   WHERE REF_GAME_ID = 10         
  </code></pre>