If it can only be "YES" or "NO" try
=(RIGHT(A2,3)="Yes")+0
or to take into account "neither of those" and return a blank in that case
=IF(RIGHT(A2,3)="Yes",1,IF(RIGHT(A2,2)="No",0,""))
regards, barry