title: INSERT INTO SELECT CASE
body: <p>I have two tables, <code>Variables</code> and <code>Processes</code>.<br/>
  I want to implement a <code>INSERT INTO SELECT CASE</code>, but I've never done this before.</p>
  
  <p>Data goes from <code>Variables</code> to <code>Processes</code> always.
  But I don't know what columns.</p>
  
  <p>For example :</p>
  
  <p><code>Variables</code> table has the columns below :</p>
  
  <p><code>Variable_ID</code><br/>
  <strong><code>Set_To_Value_ID</code></strong><br/>
  <strong><code>Set_To_Variable_ID</code></strong><br/>
  <strong><code>Changed_In_SP</code></strong><br/>
  <strong><code>Comment_Input</code></strong><br/></p>
  
  <p>The first column is always copied to the <code>Processes</code> table. <br/><code>Set_To_Value_ID</code>, <code>Set_To_Variable_ID</code>, <code>Changed_In_SP</code>, <code>Comment_Input</code> need a <code>SELECT CASE</code> because only one can have a value. three of these columns in a row will always be null. Whatever column is not null should be inserted in the <code>Processes</code> table :</p>
  
  <p><code>Processes</code> table :</p>
  
  <p><code>Process_ID</code><br/>
  <code>Variable_ID</code><br/>
  <strong><code>Value_ID</code></strong> - ( <code>Set_To_Value_ID</code> goes here )<br/>
  <strong><code>Manual_Value</code></strong> - ( <code>Set_To_Variable_ID</code>, <code>Changed_In_SP</code> <em>OR</em> <code>Comment_Input</code> goes here )<br/></p>
  
  <p><code>Variable_ID_To_Change</code> goes to <code>Variable_ID</code>.</p>
  
  <p>How to proceed?<br/>
  Thank you.</p>