Hi Nitros,
Welcome to the forum.
Try...

=IF(and(D12="Y",E12="Y"),"A",IF(and(D12="N",E12="Y"),"C","B"))