Choose 1, Go with inner join. Check this example. Inner join easily find your data.
declare @a table (id int, name varchar(50))
declare @b table (id int, name varchar(50))
declare @c table (ida int, idb int)
insert into @a values(1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e')
insert into @b values(1,'x'),(2,'y'),(3,'z')
insert into @c values(1,1),(1,2),(2,1),(2,3),(3,1),(3,2),(3,3)
declare @value int = 1
select
a.name, b.name
from
@c c
inner join @a a on c.ida = a.id
inner join @b b on c.ida = b.id
where c.ida = 1 -- here you just comment and check the logic