Historically liquids have been stored in sealed bag-like containers and then drunk through a tube. These are somewhat similar to how many children's drinks are packaged and stored.
As another answer has said, there have been demonstrations of drinking containers that take advantage of certain physical properties which allow a liquid to stay inside an open containers.
There is also video of astronauts letting water loose inside their cabin and then taking into their mouths by moving their head into a position which allows that. This was part of an educational video in which astronauts were showing how liquid behaves in a low gravity environment.