T-SQL Statement Task choose specific database name on server
Do not rely on GUI .. use TSQL instead :-)

Many options you have to do your simple task :


use 3 part naming SELECT * INTO dbname.schema.mytable FROM dbname.schema.anothertable
explicitely use use dbname; SELECT * INTO mytable FROM anothertable;
Use sqlcmd - either sqlcmd.exe or in SSMS query window
Use powershell 


BTW, dont use maintenance plans - instead use Ola's maint solution