I have a very strange situation and need expert opinion that is there any solution available or should i change my database structure.
Test Tables
ID TestName
1 HP
2 PV
3 UX
Patient Test Records
ID PID TestName TestValues Date
1 2 HP 23 12-11-2017
2 2 PV 88 12-11-2017
3 5 UX 24 14-11-2017
4 5 HP 44 14-11-2017
5 2 UX 33 15-11-2017
Expected Output for each patient
TestName PId 12-11-2017 15-12-2017
HP 2 23 -
PV 2 88 -
UX 2 - 33
Now should I restructure my DB and is there any solution in MSSQL.