I managed to solve this problem by using 2 workflows:
1) Find Network with certain label for cluster (think I got this from the VMware vCo training site)
2) Connect virtual machine NIC number to distributed virtual port group (got that here
)
I simply passed the result of the case statement from the original post to the 1st work flow and I also had to customize that workflow with the JS I found here: matching on a portgroup
Hopefully this helps someone.