Percent chance

Ok so i am trying to have a 3 different functions that all have varying chances of occuring. I remember a while back seeing a way to make a random number generator using a loot table, where you could have the weights for each item be the percentaes, and then use the type of item generated to do different things, but i do not remember the way this was done.

I am basically wondering if there is a way to run a different function depending on the item generated from the following loot table?

  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:green_wool",
          "weight": 75
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:blue_wool",
          "weight": 20
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:purple_wool",
          "weight": 5
        }
      ]
    }
  ]
}```
Continue to help post