title: Selecting SQL Column from Value of Parameter
body: <p>I have a table containing columns titles like CR_Name, CV_Name, IC_Name.  I am trying to write a query so that if the @p parameter is set to 'CR', my select query will pull the CR_Name column as well as any other column I want that starts with CR.</p>
  
  <p>I have tried the below and it has failed.  Is it possible and if so how?</p>
  
  <pre><code>declare @p char(2) = 'CR'
  
  select
  @p_name  --I want this to be the 'CR_name' column
  from table
  where @p_status = 0 --I want this to be the CR_status column
  </code></pre>