The use of submm dust continuum emission to probe the mass of interstellar dust and gas in galaxies is empirically calibrated using samples of local star forming galaxies, Planck observations of the Milky Way and high redshift submm galaxies (SMGs). All of these objects suggest a similar calibration, strongly supporting the view that the Rayleigh-Jeans (RJ) tail of the dust emission can be used as an accurate and very fast probe of the ISM in galaxies. We present ALMA Cycle 0 observations of the Band 7 (350 GHz) dust emission in 107 galaxies from z = 0.2 to 2.5. Three samples of galaxies with a total of 101 galaxies were stellar mass-selected from COSMOS to have $M_* simeq10^{11}$msun: 37 at z$sim0.4$, 33 at z$sim0.9$ and 31 at z$=2$. A fourth sample with 6 IR luminous galaxies at z = 2 was observed for comparison with the purely mass-selected samples. From the fluxes detected in the stacked images for each sample, we find that the ISM content has decreased a factor $sim 6$ from $1 - 2 times 10^{10}$msun at both z = 2 and 0.9 down to $sim 2 times 10^9$msun at z = 0.4. The IR luminous sample at z = 2 shows a further $sim 4$ times increase in M$_{ISM}$ compared to the equivalent non-IR bright sample at the same redshift. The gas mass fractions are $sim 2pm0.5, 12pm3, 14pm2 ~rm{and} ~53pm3$ $%$ for the four subsamples (z = 0.4, 0.9, 2 and IR bright galaxies).