Can we do conditional pre-request data setup

I want to do a conditional pre-request data setup but not sure how we can do it.
I have an address section in my payload and I want to set the country and State dynamically.
I want to set state based on the country. I have written a pre-req script to select Country as U, MX or CA randomly.
I have state list which is different for all the country. I want to set state based on the country selected.
How can I do it? Any help is much appreciated.

“physicalLocations”: [


                    "address": {

                        "addressType": null,

                        "addressLine1": "7601 knox ave s",

                        "addressLine2": "256",

                        "addressLine3": null,

                        "city": "richfield",

                        "state": "MN",

                        "country": "{{country}}",

                        "postalCode": "sdfsdf",

                        "addressDescription": null


                    "description": "description"