title: How to select dynamic column value from a table?
body: <p>I have a table called "TableA" which has the following records:</p>
  
  <p>TableA:</p>
  
  <pre><code>      ID       Jan       Feb
       ----     -----     -------
        1      '01/12'    '04/12'
  </code></pre>
  
  <p>Here I want to select any one of the column value from the table. But the column name is assigned to a variable. We don't know the exact column name.</p>
  
  <p>For Example:</p>
  
  <pre><code>    Declare @Month VARCHAR(20)
      SET @Month = 'Feb'
  
      Select @Month from TableA
  </code></pre>
  
  <p>It gives the Output as follows:</p>
  
  <pre><code>    'Feb'
  </code></pre>
  
  <p>But the Desired Output is '04/12'</p>
  
  <p>How to get the desired output?</p>