title: SQL Stored Procedure with column name as variable
body: <p>I really think this is a simple fix, but I didn't find any solution on the Internet (at least none I could understand).</p>
  
  <p>I have this stored procedure:</p>
  
  <pre><code>ALTER PROC [dbo].[GetCard](
      @Input varchar(50),
      @Input2 varchar(50)
  )
  AS
  SELECT * FROM Main WHERE @Input = @Input2;
  </code></pre>
  
  <p>But when I go:</p>
  
  <pre><code>GetCard 'CardName', 'Text';
  </code></pre>
  
  <p>SQL doesn't quite understand that <code>@Input</code> is a column. What do I have to change? Does it need any special syntax?</p>