title: Select a column based on a condition SQL Server
body: <p>I have a situation like this:</p>
  
  <pre><code>SELECT 
     fName, 
     lName
  FROM employee as e
  join payroll as p ON p.frn_employeeid = e.employeeId
  </code></pre>
  
  <p>For employeeId = 2 (WHERE e.employeeId = 2) I also want to add another column on the select clause payCheck </p>
  
  <pre><code> SELECT 
     fName, 
     lName,
     payCheck (this column should show on the report ONLY if employeeId = 2)
  FROM employee as e
  join payroll as p ON p.frn_employeeid = e.employeeId
  </code></pre>
  
  <p>I appreciate any help on achieving this.</p>
  
  <p>Note:
  I know that one thing I can do is use two queries and then check if employeeId =2 run let say query 1 else run query 2 .
  I am looking if there is a away to use only one "SMART" query </p>