Using a range of numbers in a variable?

I’m essentially making a Crossy Road type character-creator, and I’m using random range to determine a number, but is it possible to have a range of ints in the chances, to make rarities. Sort of like this:(the colon means to, i.e. 1 to 10)

if (cash > 100) {

		selection = Random.Range (1, 100;
			if (selection = 1:10){
				Debug.Log("Common Character1");
			}
			if (selection = 11:15){
				Debug.Log("Rare Character1");
			}
			if (selection = 100){
				Debug.Log("Legendary3");
			}
			}

float selection = 0.0;
if (cash > 100) {
selection = Random.Range (1, 100);
if (selection <= 10) {
// If selection is 0 - 10 then…
Debug.Log(“Common Character1”);
}
else if (selection <= 15) {
// If selection is 10 (exclusive) - 15 then…
Debug.Log(“Rare Character1”);
}
else if (selection == 100) {
// If selection is 100 then…
Debug.Log(“Legendary3”);
}
else {
Debug.Log(“No Character for you, haha jkjk”);
}
}

If that doesn’t make sense to you… (the above is probably the best way) you could also do the following… which is the same as I did above

float selection = 0.0;
if (cash > 100) {
   selection = Random.Range (1, 100);
   if (selection >= 1 && selection <= 10) {
      // If selection is 0 - 10 then...
      Debug.Log("Common Character1");
   }
   if (selection >= 11 && selection <= 15) {
      // If selection is 11-15 then...
      Debug.Log("Rare Character1");
   }
   if (selection == 100) {
      // If selection is 100 then...
      Debug.Log("Legendary3");
   }
}

Be aware that selection returns a float, which is a decimal value, so it can return 10.4. The second examples if statements won’t apply but that is the example that you wanted. You can change the numbers to be correct and include all the values.

There are a lot of different ways to write this. All up to you.