Try with below SQL query:
create table tableA(id int, columnname varchar(10));
INSERT INTO tableA VALUES(1, 'col1');
INSERT INTO tableA VALUES(2, 'col2');
INSERT INTO tableA VALUES(3, 'col3');
create table tableB(daterpt datetime, col1 int, col2 int, col3 int);
INSERT INTO tableB VALUES('10-10-2016', 45, 55, 12);
select temp1.id, temp1.column, temp2.value from tableA temp1
INNER JOIN (select u.column, u.value
from tableB s
unpivot
(
value
for column in (col1, col2, col3)
) u) as temp2
ON temp1.column = temp2.column;