Mysql:
Table_A
------------
id name
1 Name1
2 Name2
Table_B
------------
a_id type value
1 width 100
1 height 100
1 color red
2 width 50
2 height 80
It’s unknown how many type values exist in Table_B.
how to get result as:
id name width height color
1 Name1 100 100 red
2 Name2 50 80 null
But seriously consider redesigning your schema. value is holding colors and linear dimensions, it’d be better if it were designed differently.
Keep TableA the way it is but then have a table called Details that has width/height/color columns. Or have a table called Size with width/height columns and a table called Color with the color name or RGB value. Each additional table of course has an FK to TableA which may or may not be used as that table’s PK.