Either function works for that purpose:
If ( field1 = "yes" ; Field2 )
Case ( Field1 = "yes" ; field2 )
What you haven't indicated is what should happen if the value in Field1 is NOT "yes". In the above examples, the field will be empty if the value is not yes, but other options are possible.
Thank you so much! In my case, if the value in Field1 is not yes, i want the field to be empty. So your formula worked perfectly.