select t1.fk_user_id,
t2.signature_value as project_signature,
t3.signature_value as user_signature,
t4.signature_value as telefon,
t5.signature_value as fax
FROM
(
SELECT s.*,
sum(IF (s.name_id = 1, s.value_id,NULL)) AS id1,
sum(IF (s.name_id = 2, s.value_id,NULL)) AS id2,
sum(IF (s.name_id = 3, s.value_id,NULL)) AS id3,
sum(IF (s.name_id = 4, s.value_id,NULL)) AS id4
FROM tbl_signature s
GROUP BY s.fk_user_id,s.project_id
) t1
left join tbl_signature_value t2 on t1.id1=t2.id
left join tbl_signature_value t3 on t1.id2=t3.id
left join tbl_signature_value t4 on t1.id3=t4.id
left join tbl_signature_value t5 on t1.id4=t5.id
WHERE t1.project_id=25
GROUP BY t1.fk_user_id
ORDER BY t1.fk_user_id;