You can do this without code.
Create a field in your form which will hold the email address that you will use for the email data connection.
Then just use a rule with your conditions which uses the set field action and the concatenate function to build the three addresses.
concat("[email protected]; [email protected];", Email)
You can use fields ratyher than text but remmebr to concatenate a ";" between each one so Outlook likes it.