Όπως and σαν are interchangeable in many cases, with σαν being the most commonly used one.
The difference is that σαν means like, όπως also means however.
They are interchangeable in cases like
Είσαι κόκκινος σαν/όπως μία ντομάτα - You're red like a tomato.
But not in cases like
Do it however you like - Κάνε το/ Κάντο όπως θέλεις. (Where όπως is actually used like however)
So, in other words, όπως could replace σαν in some cases, but the cases that σαν replaces όπως are really few, if not none.^.^