How to modify a variable, used as name for docker image

I’m successfully using successfully the new dropdown feature of Gitlab [15.7.5-ee] and use its value as variable to a docker image in one of my stages. I.e.

...
variables:
    AUTOMATION_TESTING:
    value: ""
    options:
      - ""
      - my_docker:v1.0
...
automation testing:
  image: 
    name: ${AUTOMATION_TESTING}
...

Now things need to become more dynamic a use the AUTOMATION_TESTING variable to store one more mapped value to this specific docker for internal docker use, so “my_docker:v1.0” will now become “my_docker:v1.0:mapped-value” and somehow hide the “mapped-value” when passing it to image->name. For example:

automation testing:
  image: 
    name: ${AUTOMATION_DOCKER}
  rules: 
    - if: $AUTOMATION_TESTING
      variables:
         AUTOMATION_DOCKER=$(echo $AUTOMATION_DOCKER | awk -F':' '{print $NF}' )

This of course doesn’t work. I also tried to place variables inside the options of AUTOMATION_TESTING variable, but they become literals.

Do you know of any meaningful approach to this situation, having in mind I want to keep the dropdown menu?

I think I managed to work this around by using the following sample approach:

  AUTOMATION_TESTING:
    value: ""
    options:
      - ""
      - "my_docker:v1.0:thread_memory"
      - "my_docker:v1.0:thread_nvram"
      - "my_docker:v2.0:thread_memory"
    description: "type:version of the test"

Then in the automation testing section you:

automation testing:
  image: 
    name: ${AUTOMATION_DOCKER}
    entrypoint: [""]
  rules:
    - if: $AUTOMATION_TESTING =~ /^my_docker:at-v1.0:.*/ 
      variables:
        AUTOMATION_DOCKER: "my_docker:v1.0"
      when: on_success
    - if: $AUTOMATION_TESTING =~ /^my_docker:v2.0:.*/
      variables:
        AUTOMATION_DOCKER: "my_docker:v2.0"
      when: on_success