if-else statement using commands??

is it possible to write an if else statement using commands like for example

if the players score on a scoreboard is 1 then run a function but if it's 0 then run a different function

not sure if that's possible using datapacks since i'm really new to them and have only made about 1-2 so far 🤷‍♂️

Continue to help post