Randomization with Constraint

Thank You dave_59 sir
Can I get explanation for your solution as I didn’t got how const’ works here.
Can you please give some idea.
Also I want that the last randomized value of tst should not be test6. I tried in many ways by my understanding but I am not able to achieve the task.
I have to put both constraint parallelly like tst should get test6 if test5 comes and the last randomized value should not be test6.

Thanks in advance