SELECT string FROM some_table WHERE string = ? OR ( match = ? and off_by = 1 ) OR ( match = ? and off_by = 2 )