Two-terminal multistate memory elements based on VO2/TiO2 thin film microcantilevers are reported. Volatile and non-volatile multiple resistance states are programmed by current pulses at temperatures within the hysteretic region of the metal-insulator transition of VO2. The memory mechanism is based on current-induced creation of metallic clusters by self-heating of micrometric suspended regions and resistive reading via percolation.