how to view data as history of field value change
This should work on SQL Server 2012 +

   ;with cte as
    (select employeeId,
            Salary AS 'NewSalary',
            lead(salary,1,0)over(partition by employeeid order by salary desc) as 'OldSalary',
            row_number()over(partition by employeeid order by salary desc) as rn        
     from Table_2 
     )

     select employeeId,
            NewSalary,
            OldSalary
     from cte
     where OldSalary &lt;&gt; 0 or (OldSalary = 0 and rn=1)