select description=max(case when th.objectpropertyid=1000097 then th.value else '' end), topimage=max(case when th.objectpropertyid=1000098 then th.value else '' end), toplink=max(case when th.objectpropertyid=1001695 then th.value else '' end), leftimage=max(case when th.objectpropertyid=1000099 then th.value else '' end), leftlink=max(case when th.objectpropertyid=1001696 then th.value else '' end), rightimage=max(case when th.objectpropertyid=1000100 then th.value else '' end), rightlink=max(case when th.objectpropertyid=1001697 then th.value else '' end), backgroundcolour=max(case when th.objectpropertyid=1000102 then th.value else '' end) from objectdata th with (nolock) join objectdata a with (nolock) on th.objectid=a.objectid and a.objectpropertyid=1000101 join objectdata web with (nolock) on th.objectid=web.objectid and web.objectpropertyid=1000710 join objectdata pt with (nolock) on th.objectid=pt.objectid and pt.objectpropertyid=1000193 where th.objecttypeid=1000015 and th.objectpropertyid IN (1000097,1000098,1000099,1000100,1000102,1001695,1001696,1001697) and a.value='True' and web.value='1001127' and pt.value = '1193898'