select t2.secid
from
(
select row_number() over (order by
case when param1=t2.secidtype then 1 else 2 end,
case when param2=t2.secidtype then 1 else 2 end) rn, t1.id, t2.secid
from t1 inner join t2 on t1.id=t2.id
where t2.secidtype in (param1, param2, param3)
) sq
where rn = 1
The question is what role does t1 play in your question that only deals with t2??
I have included it in the inner join just as an example.