select c.nama as data
from perkara_pihak5 a
join pihak b on a.pihak_id=b.id
join agama c on b.agama_id=c.id
where a.saksi_pihak_ke=1 and a.perkara_id=#perkara_id#
order by a.urutan
limit 0,1