Competing Intramolecular vs. Intermolecular Hydrogen Bonds in Solution