0
Sorry to say but your table structure is difficult to work with considering what you want to do. There are various ways you can probably get the result, one way would be to use UNPIVOT and PIVOT, but it's ugly.
You could start by UNPIVOTing the date in TB1 from your columns to rows:
select *
fr...