title: Select values from different columns based on a variable containing column names
body: <p>I have a data.table like this:</p>
  
  <pre><code>col1   col2   col3  new  
  1       4     55    col1 
  2       3     44    col2
  3       34    35    col2
  4       44    87    col3
  </code></pre>
  
  <p>I want to populate another column <code>matched_value</code> that contains the values from the respective column names given in the <code>new</code> column:</p>
  
  <pre><code>col1   col2   col3  new    matched_value
  1       4     55    col1        1
  2       3     44    col2        3
  3       34    35    col2        34
  4       44    87    col3        87 
  </code></pre>
  
  <p>E.g., in the first row, the value of <code>new</code> is "col1" so <code>matched_value</code> takes the value from <code>col1</code>, which is 1.</p>
  
  <p>How can I do this efficiently in R on a very large data.table?</p>