So this works...
ALTER TABLE variation AUTO_INCREMENT = 10;
But I want to do this;
ALTER TABLE variation AUTO_INCREMENT = (
I'm not familiar enough with mysql to give a specific answer. However, in other database engines, there's an EXEC method you can pass a string into that will be executed. You simply write a script that determines the value you want for the auto_increment, then insert that value as a string into the script that is EXEC'd. Basically writing a script that writes a second script and runs it.
EDIT: Looks like you want a prepared statement. Search for 'Dynamic SQL' There's an almost duplicate here
EDIT2: Tim, ref this link that is referred to in the almost duplicate StackOverflow post previously given. Search for the string 'Using Parameters' on the page, and you'll get the skinny on that. MySql makes this a little difficult apparently. In MSSqlServer 2000, this was a trivial process. Here is another link to an article about mysql dynamic sql