Hi,
this is pretty easy to achieve having in mind the following:
1. SG500 is set in layer 3 mode
2. there are VLAN interfaces created with IP addresses matching the DHCP server pools/subnets
3. DHCP server on SG500 can be enabled only when DHCP client from default VLAN 1 is disabled
4. DHCP server pools are having option 3 (default gateway) set to be this switch (routing device) for respective VLAN interfaces
5. switch has static default route set to point out your internet gateway
6. the internet gateway has return routes for all the VLAN/subnets it is not aware of
7. internet gateway will do or needs to be set to perform NAT for all other VLAN/subnets it is not aware of
8. would recommend you to ensure that our SG500 has the latest firmware and bootcode before you start testing
Regards,
Aleksandra