Complex SQL IF statement for an SSIS package

I need to send letters to the primary member of a health club regarding the balances of each of the minors under their membership that are the age of 21 or under. There are some minors that have a different address than the primary member and there are some that don’t have any address listed in the table so I need the primary member's address for these minors. One of the tables that I am using has the gym membership numbers (the same membership number is issued to all names on an account) member names, relationship (primary member, secondary member(spouse), minors, dob, and age. The other table has the membership numbers and the addresses. I will use a Merge join in SSIS to combine the data of these two tables. Any suggestions are appreciated.

Example of Data