If you want to query SQL Server without having to enter a password, you have 2 main options that I know of:
1. Use code to connect to the database and pull down the queries that you are interested in
2. If you want read-only access to SQL Server, consider using pass-through queries. In this case you need to create the SQL by hand, but the connection string is part of the query so users don't need to enter passwords.