Generally the Transformer works on AC. Transformer cannot operate on DC because it need changing flux. Although if we change the DC voltage level or varies DC, only then transformer can give output. Let me tell you one thing, if you are varying the DC it is no longer DC. By the way this question does not make sense what if still there is an answer to it then it is simply that we have to vary the DC voltage.