Line emission is strongly dependent on the local environmental conditions in which the emitting tracers reside. In this work, we focus on modelling the CO emission from simulated giant molecular clouds (GMCs), and study the variations in the resulting line ratios arising from the emission from the $J=1-0$, $J=2-1$ and $J=3-2$ transitions. We perform a set of smoothed particle hydrodynamics (SPH) simulations with time-dependent chemistry, in which environmental conditions -- including total cloud mass, density, size, velocity dispersion, metallicity, interstellar radiation field (ISRF) and the cosmic ray ionisation rate (CRIR) -- were systematically varied. The simulations were then post-processed using radiative transfer to produce synthetic emission maps in the 3 transitions quoted above. We find that the cloud-averaged values of the line ratios can vary by up to $pm 0.3$ dex, triggered by changes in the environmental conditions. Changes in the ISRF and/or in the CRIR have the largest impact on line ratios since they directly affect the abundance, temperature and distribution of CO-rich gas within the clouds. We show that the standard methods used to convert CO emission to H$_2$ column density can underestimate the total H$_2$ molecular gas in GMCs by factors of 2 or 3, depending on the environmental conditions in the clouds.