Legally speaking, children cannot pick which parent to live with. The decision is not up to them alone. When forced to make a ruling, courts will favor joint custody and consider all sorts of factors, from living situations to family roles to criminal records.
The children's wishes may be taken into account, especially as they grow older, but they are not the only factor in the equation.
That said, some parents do prioritize asking the children what they want. These parents are focused on the children's best interests, and their intentions are good. They just want the kids to be happy.
While it is wise to consider their desires, experts warn that it can be problematic to let them choose outright. The children may not be in a place, mentally or emotionally, to make that decision. They may choose something they later regret. Remember that rationality and logic do not always guide decisions when you are a young teenager or child.
In fact, many people who did get to choose have later expressed guilt and regret. They felt bad to have "abandoned" one parent in favor of the other. That decision may have been based on minor factors -- like one parent letting them stay up later and offering more freedom -- but the decision can cause damage to relationships that lasts into adulthood.
When you and your spouse split up, make sure you understand all of your parental rights and how to craft a functional child custody arrangement. Always focus on the child's best interests, but remember that children themselves can sometimes lose sight of that.