I have two rows in my table myTable

myTable
Row Name Flag1 Flag2 Number
1 Primary Y N 1234
2 Secondary N Y 4444

I need a query which needs to fetch a single row like this

Row Name Number
1 Primary 4444

The condition is like this
The resultant record should pick the Name iff the Flag1 is Y and the Number iff the Flag2 is Y.

Note: If I use 'Flag1 and Flag2' in my where clause I get don't get any records... If I use 'Flag1 or Flag2' I get two records but I want only one