How to select a target in upstream

Hi all
I expose an API which has 2 targets @IP : 1 for production and 1 for prod

Is it possible to create 1 upstream with this 2 targets and instead of making a load balancing, having a way to select prod or preprod

upstream ==> target 1 ==> production
==> target 2 ==> preproduction

I read the doc with all hash_on parameters but I not sure that it could make the job

I just ask the question to avoid to create 2 services with 2 upstreams

Thank you for your feedback

I think a have my solution : Set Dynamic Upstream Host plugin | Kong Docs