I’d agree with Tim. Don’t try and achieve this using one single test in Lectora. If you have a core set of questions that everyone should get asked then group them in one test. This would get shown to everyone. Then create separate tests for all other variations that you want to target – skill level or location etc. Just show these tests to whoever you wish using your IF THEN reasoning (i’d think that it probably will require the user to self-select).
You will then need to convert the score at the end module as the default % score will not be correct (as, for example, the user will only have completed 2 tests out of a possible 10). In this example you would perhaps want to multiply the total score by 5 and then pass this value to the LMS (or alternatively you could work with the individual test scores to calculate the proper score that way). NB: To make the calculated total scores consistent and fair, all of the optional tests should really have the same number of questions / weightings etc.