Alter Table with var from cursor
Only values, not table names nor column names, can be filled in the easy way.

Instead, construct the SQL statement with CONCAT, then PREPARE and EXECUTE the statement.