How to transform to multiple rows and multiple columns

How do i get "Name" Column given condition that im using unpivot/pivot settings. https://www.sqlservercentral.com/Forums/1061004/Compare-Two-Row-in-the-table-and-find-what-columns-are-changed

Please post your data as ddl and dml?

Create table xyz(column1 int....

Insert into xyz
Select data union
Select data