I defined a new variable
Name Value Description
categories (1, 2, 3, 4, 5) my categories ids
and in my path i want to
For your scenario you could try to use the JSR233 components (Sampler, PreProcessor, PostProcessor) with a bit of java/groovy code.
E.g.:
Define your data as you've done:
Name Value categories 1,2,3,4,5
(i.e. use comma as delimiter, no spaces before and after comma).
Use the JSR233 Sampler / PreProcessor / PostProcessor with the following code:
import java.util.Random;
String[] categories = (vars.get("categories")).split(",");
int idx = new Random().nextInt(categories.length);
String category = (categories[idx]);
vars.put("rnd_cat", category);
Refer to the randomly picked category using ${rnd_cat}.