title: SQL query to generate report by comparing same column for two diff condition
body: <p>I have a table as below</p>
  
  <pre><code>EmployeeID  EmpName   Year    CTC
  ----------  -------   ----    ---
   1          ABC       2016    100
   1          ABC       2017    200
   2          DEF       2016    300
   2          DEF       2017    400
  </code></pre>
  
  <p>I am trying to generate a report using SQL. </p>
  
  <p>The report should be having following details</p>
  
  <pre><code>      EmployeeID  EmpName   2016_CTC  2017_CTC       %CHANGE
        ----------  -------   --------  -----------    -------
            1       ABC         100       200          100
            2       DEF         300       400           66.66
  </code></pre>
  
  <p>Kindly help.</p>