I am travelling to the Czech Republic and have got my Schengen visa, but now I am planning to alter the itinerary and also visit Vienna and Berlin. Can I do this?
It sounds like you applied for a Limited territorial validity visa (LTV). Which means you can only visit the Czech Republic if that's what's specified on the visa.
There is a specification number or code printed on the visa which states the type of visa you have obtained.
The LTV, which limits traveling to the issuing state, applies to persons entering the country due to humanitarian reasons, under international obligation or in emergency cases without holding valid traveling documents.