I achieved this by creating a switch controller with the following switch value:
${__javaScript( var s="001"; new Number(s.charAt( Math.floor(Math.random()*s.length) )) )}
javascript selects a random character from string s and converts it to a number. Thus, in the above example, 0 will be selected twice as often as 1, and the scales can be changed by adding / removing characters from the string.
I used String, not an array, because the javascript version used by my version of JMeter did not seem to support array literals, so this made it a little less verbose.
source share