The ability to perform different chemical transformations on a molecule using the same catalyst just by varying reaction conditions is a great challenge in synthetic organic chemistry. We report here that the reaction of aldehydes with a catalytic amount of AgOTf leads to trimerization products (trioxanes). Interestingly, when the same reaction is performed under 4 atmospheres of H2, the reaction changes its course and leads to aldol condensation products. We believe that in AgOTf catalyzed aldehyde trimerization process, AgOTf acts as a Lewis acid. However, when H2 is added to the reaction mixture, heterolytic cleavage of H2 takes place, leading to the formation of H+ (Bronsted acid) species that selectively catalyze the aldol condensation reaction. The mechanism, supported by DFT calculations, for these transformations is proposed.