This script will show the changes made to the rows of the table.
First enable change tracking for database and then for the table. This can be done in properties window.
@lastSyncNumber is the last commited sync number for the changes made.
CHANGE_TRACKING_IS_COLUMN_IN_MASK(COLUMNPROPERTY(OBJECT_ID('employee'), 'Active', 'ColumnId'), SYS_CHANGE_COLUMNS)IsActiveChanged
This statement will show if this particular column for the row has changed or not. If it returns 1 means change and 0 means not change,