Sketch will be used only after opponent has used a move otherwise it fails if you mimic a failed sketch it wont be copied and if you use a move , it is sketched and then you use mimic it will fail because the move that you try to mimic is the move copied by sketch and not sketch itself.
Even if it would have worked mimic would copy sketch just for the battle and in order to learn a desired move you need to have an opponent with both sketch and the desired move .