What you want (in a single question with mulitple sub-parts) to do is possible with the STACK question type https://moodle.org/plugins/qtype_stack - but that is not the easiest plugin to install because in addition to the Moodle plugin, you also need to install the maths processing software (Maxima) which it uses.
The other way to achieve what you want with standard question types is to create each separate variant you want as a separate question in the question bank (since they are multip-part qusetions, they would need to be Cloze), and then use the Moodle feature to add one picked at random to the quiz: https://docs.moodle.org/310/en/Effective_quiz_practices#Robust_testing_with_random_variants. (The down-side of this method is that you have to create and maintain multiple questions.)
The other way to achieve what you want with standard question types is to create each separate variant you want as a separate question in the question bank (since they are multip-part qusetions, they would need to be Cloze), and then use the Moodle feature to add one picked at random to the quiz: https://docs.moodle.org/310/en/Effective_quiz_practices#Robust_testing_with_random_variants. (The down-side of this method is that you have to create and maintain multiple questions.)