declare @table varchar(100)
select @table=sParamterValue from table where id='sParamentCode'
exec('select * from '+@table+'..DataBaseName')
select @table=sParamterValue from table where id='sParamentCode'
exec('select * from '+@table+'..DataBaseName')