Hi,
try this query once
select P.productid, P.displayname, P.skuno, P.haslicense,P.isevalversion,O.oemname,P.oemid from productmast P Inner join userpermission U on P.productid=U.productid join oemmast O on P.oemid=O.oemid
Here you've to retrieve P.oemid also in first join then only you can compare in second join
All the Best