Constraining alternatives in the SP

I have an attribute with three levels, lets say 1, 2 and 3. And two options for the respondent to select, A and B. How can I constrain the levels so that levels 1 and 2 are always displayed, at least once, among option A and B.

This is the essence of a built for purpose experimental design.
There are two ways
a) generate a full factorial design
b) randomly draw rows that satisfy your constraints.
c) apply whatever other metrics are necessary e.g. dominance, balance
d) perform some sort of validation that the design is valid (e.g. monecarlo simulation)
e) repeat several thousand times

2) use an experimental design generation software to do this for you. You can specify constraints, blocking etc according to your requirements.
We recommend Ngene which is integrated into SurveyEngine- you can read the docs here

Other alternatives are JMP, write your own routines

and a problem that is readily solved when you use Ngene.