select * from A where row1='xxx' and row3>=yyy and row3<=yyy
union
select * from A where row2='xxx' and row3>=yyy and row3<=yyy