That would probably be currently, 4k RAW. But, I don't think you're really asking which is the best quality format, you're probably asking which is the most practical. 4k RAW is highly impractical because of it's massive file sizes and the limited number of systems which can handle all that data. Furthermore, unless your camera can output 4k RAW, there are no quality benefits either! Exactly which format is best for you depends on the capabilities of your camera (the quality, resolution, codec), your post-prod workflow and your distribution destination/s. In most cases, sonnyboo's advice would be the best format choices.
Actually I would say the opposite! While H.264 is a versatile format in that it can be used in a wide variety of applications, it's generally the poorest or one of the poorest choices of format for pretty much anything except what it was designed for, online distribution, where the image quality to file size ratio is of paramount importance. This
post explains why in more detail.
G