In this case you are not really "randomizing" the groups (all groups but in random order), but you are randomly displaying one of the 4 groups.
First you need to create a equation type question and generate a random number from 1-4 within it. Once you have tested and everything works, you can hide this questions via the "always hide" feature, but during development and testing I would keep it visible so you can spot issues easier.
So you would put something like this into the equation type question, assuming its question code is "random":
Code:
{if(is_empty(random.NAOK),rand(1,4),random.NAOK)}
Once this is done, you can show/hide each question group based on this random number via relevance equation for the question group.
E.g. for Group A you would put this into the relevance equation field of the question group:
So the question group "A" would only be shown if the random number generated equals "1". Then you apply the same approach to group "B" (e.g. random==2) and so on.
Here some more indepth explanations of the concept from Mazi:
survey-consulting.com/how-to-randomly-sh...a-limesurvey-survey/