Select results from table ONLY if rows meet 2 conditions
You can use an aggregate for that:

SELECT OrderId
FROM OrdersTable
WHERE Product in ('ProductA', 'ProductB')
group by orderid
having count(distinct Product) = 2;


This will give you those orders that include at least those two products. The orders might include other products as well.