title: using CASE to select column for SET in UPDATE statement IN SQL SERVER
body: <p>I want to execute the following statement. Is it possible to select which column to update using the CASE ?</p>
  
  <pre><code>UPDATE TABVAR CASE 
  WHEN M BETWEEN 0 AND 6 THEN SET M0_TO_6 = M
  WHEN M BETWEEN 7 AND 18 THEN SET M7_TO_18 = M
  WHEN M BETWEEN 19 AND 54 THEN SET M19_TO_54 = M
  WHEN M &gt; 54 THEN SET MABOVE54 = M
  END
  </code></pre>