See TechNet Article: 262499 (Currently at http://support.microsoft.com/kb/262499 )
Example, usage of Output Parameters in query passed to sp_executesql
Parameters can be combined into one string and then passed to the sp (see Article)
DECLARE @strSQL AS NVARCHAR(50)
DECLARE @cnt AS INT
SET @strSQL = 'SELECT @cnt= COUNT(*) FROM sys.messages'
EXEC sp_executesql @strSQL, N'@cnt int output', @cnt=@cnt output
PRINT @cnt