If I understood correctly, you should configure "bootprelay" in switch side to send dhcp packet to a DHCP server over source VLAN (where DHCP clients are connected) to destination VLAN (where DHCP server is located).
In DHCP server side, it can recognize the subnet of source IP address and can assign (offer) the appropriate IP address for the subnet from its dhcp pool.