title: Conditional list values replacement in Mathematica
body: <p>Please consider :</p>
  
  <pre><code>dalist = Transpose@{{"Noise1",1,1,1,1,1},{"Blah", 1, 2, 3, 4, 5},
                     {"Noise2",2,2,2,2,2}, {"COGCondition", 1, 2, 1, 2, 1}}
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/BNrgy.png" alt="enter image description here"></p>
  
  <pre><code>COGCondition1 = 10
  COGCondition2 = 20
  </code></pre>
  
  <p>I would like to replace the values in column "Blah" given the value taken in column "COGCondition" such that:</p>
  
  <p>If, for a given row, the value in column "COGCondition" = 1 the value in column "Blah" should be equal to COGCondition1 (And 2 -> COGCondition2)</p>
  
  <p>Desired output:</p>
  
  <p><img src="https://i.stack.imgur.com/9y9YQ.png" alt="enter image description here"></p>
  
  <p>I need this for a large data set and my attempts using <code>Table</code> and <code>Switch</code> have failed. I can easily generate new columns but can't figure out how to replace values using <code>Switch</code>.</p>