  We present 247-GHz molecular line observations of methanol (CH$_3$OH) toward
sixteen massive star-forming regions, using the APEX telescope with an angular
resolution of $25''$. The sample covers a range of evolutionary states,
including warm molecular cores, hot molecular cores, and ultracompact HII
regions. The hot cores, all of which include UC HII regions, show rich
molecular line spectra, although the strength of different species and
transitions varies from source to source. In contrast, the warm cores do not
show significant molecular line emission. Multiple methanol transitions are
detected toward nine of the hot cores; eight of these had enough transitions to
use the rotation diagram method to estimate rotational temperatures and column
densities. The temperatures lie in the range 104$-$168 K and column densities
from $3\times10^{16}$ to $7\times10^{18}$ cm$^{-2}$. Using the average methanol
line parameters, we estimate virial masses, which fall in the range from 145 to
720 M$_\odot$ and proved to be significantly higher than the measured gas
masses. We discuss possible scenarios to explain the chemical differences
between hot cores and warm molecular cores. One of the observed methanol lines,
$4_{2}-5_{1}A^{+}$ at 247.228 GHz, is predicted to show class II maser
emission, similar in intensity to previously reported $J_0-J_{-1}E$ masers at
157 GHz. We did not find any clear evidence for maser emission among the
observed sources; however, a weak maser in this line may exist in G345.01+1.79.
