I’ve had a play with selecting both table name and schema using variables. I can’t get it to work - it looks like it’s something to do with how Metabase or the SQL driver are passing the variable names.
There are a few options when using Stored Procedures though.
CREATE PROCEDURE [dbo].[SchemaTable]
SET NOCOUNT ON;
DECLARE @query nvarchar(1000)
SET @query = 'Select * from ' + @SchemaName +'.' + @TableName
EXECUTE sp_executesql @query
Downside is that dynamic SQL like that is inefficient as the database has to recalculate the Query Plan every time.
Variants on that would just work for one table. Better from the Metabase perspective as the same columns would be returned every time.
Still have the issue of it not showing in the question builder so you have to design using SQL all the time.