actually, instead of DISTINCT, this requires a GROUP BY, because the COUNT is needed
so to modify littlefoot's code slightly...
Code:
select b1.anstext
, b2.anstext
, count(*) as occurrences
from tablea a
inner
join tableb b1
on a.ans1 = b1.anscode
inner
join tableb b2
on a.ans2 = b2.anscode
group
by b1.anstext
, b2.anstext