Please try the following
1. Create the SP(parameter @TableName) for Pulling the table records
Example:
CREATE PROCEDURE [dbo].[GetTableData]
(
@TableName VARCHAR(100)
)
AS
DECLARE @SQL VARCHAR(MAX)
SET @SQL = 'SELECT [COLUMN NAME1],[COLUMN NAME2],.. FROM ' + @TableName;
PRINT(@SQL);
EXEC(@SQL);
2. Pass the Selected table Name As Parameter to the SP and pull the records bind it to gridview