Switch the destination field to “custom variable” and the name the new variable:
After this you can go to the specific host group and assign it based on the variable and/or it’s content. or