Your design, up to you.
It is an option to have them as percentages up front. Then compute a random number from 0 to 1 and see where it fits.
It is also an option to have a count or pool size, and use that instead of percentages. Pool 1 has 65, pool 2 has 10, pool 3 has 2, pool 4 has 1. The code can sum them up (78 total), and can compute percentages (65/78 = 83.3%, 10/78=12.8%, 2/78=2.5%, 1.3%.). You can compute a position exactly the same as with percentages.
Also, many games lie to players. That's okay, as long as it is fun. Your percentages don't need to be exact, they can be approximations and nobody will care. Games typically don't need to specify that the odds of a “super rare” item, or a unique item relative to all items, and unless you are off by a dramatic amount the players won't notice.
For selection with either approach, an easy method is to just subtract and loop. That is, pick a random target number from 0 to the sum. The sum will happen to be 100% if you started with percentages, or whatever number of items in all pools for that approach. If the number is between 0 and the size of the first pool, use it, otherwise subtract the size of the first pool. Then if the number is between 0 and the size of the next pool, use it, otherwise subtract the size of the pool. Repeat until you have identified the pool it is in..
There are more advanced algorithms for large collections, but for a reasonably small array under a few hundred or potentially even a few thousand category pools, the simple solution will be hard to beat, just checking against an array of sizes.