Turning ECHO on might have guided you to the answer. You were testing %2 = empty as null - If tests strings.
But if the wish was to print 1 2 3 then there is no need for %2...
IF "%1" == "" GOTO end
would work. A sprinkling of pauses can help, too.
I hope that made sense.