  Intermediate-velocity clouds (IVCs) are HI halo clouds that are likely
related to a Galactic fountain process. In-falling IVCs are candidates for the
re-accretion of matter onto the Milky Way. We study the evolution of IVCs at
the disk-halo interface, focussing on the transition from atomic to molecular
IVCs. We compare an atomic IVC to a molecular IVC and characterise their
structural differences in order to investigate how molecular IVCs form high
above the Galactic plane. With high-resolution HI observations of the
Westerbork Synthesis Radio Telescope and 12CO(1-0) and 13CO(1-0) observations
with the IRAM 30m telescope, we analyse the small-scale structures within the
two clouds. By correlating HI and far-infrared (FIR) dust continuum emission
from the Planck satellite, the distribution of molecular hydrogen (H2) is
estimated. We conduct a detailed comparison of the HI, FIR, and CO data and
study variations of the $X_\rm{CO}$ conversion factor. The atomic IVC does not
disclose detectable CO emission. The atomic small-scale structure, as revealed
by the high-resolution HI data, shows low peak HI column densities and low HI
fluxes as compared to the molecular IVC. The molecular IVC exhibits a rich
molecular structure and most of the CO emission is observed at the eastern edge
of the cloud. There is observational evidence that the molecular IVC is in a
transient and, thus, non-equilibrium phase. The average $X_\rm{CO}$ factor is
close to the canonical value of the Milky Way disk. We propose that the two
IVCs represent different states in a gradual transition from atomic to
molecular clouds. The molecular IVC appears to be more condensed allowing the
formation of H2 and CO in shielded regions all over the cloud. Ram pressure may
accumulate gas and thus facilitate the formation of H2. We show evidence that
the atomic IVC will evolve also into a molecular IVC in a few Myr.
