select a from tabella1 where b = 1

questo intendi?