If you want to lookup a value in SQL Server from inside a BizTalk Map, then you can use the Database Lookup Functoid.
If you want to lookup something in a database without using a map, then you can use the BizTalk adapter for SQL Server from within an orchestration, as described here, to SELECT the data from SQL.
The values in each "schema" (really, I mean in each message), should be either promoted properties or distinguished fields, which will allow you to access and set them directly from within your orchestration.