title: SELECT statement inside CASE clause in TSQL throws error
body: <p>I had to fine tune a bunch of stored procedures and got one which had loads of <code>IF ELSE blocks</code> within them they had insert statements with transactions. Hence i modeled them using case to find that i get syntax errors try the below statement(a simple example of what is being done) but sure you will get the idea</p>
  
  <pre><code>DECLARE @rowcount int
  SELECT @rowcount = -1
   CASE WHEN @rowcount = -1 THEN
      select 'I WON THE RACE'
   WHEN '2' 
      SELECT 'WHAT A LOSER'
   END
  </code></pre>
  
  <p>each cases have more than one statement, so i just encased them inside <code>(</code> and <code>)</code> but to noavail. Please correct my knowledge of Case in TSQL. <strong>(Using SQl Server 2005 if that helps)</strong></p>