Not sure why do you want to get this information from the Tridion Config file but you may follow below steps to get the versions -
For Content Manager: you can check the "About SDL Tridion" tab in the Dashboard as shown below

Alternatively, you may click on the top-right corner SDL | Tridion text to open a pop-up and see the version as shown below:

For Content Delivery: You need to rely on the size (or versions) of the DLLs and JAR files as far as I know.
For Database: you may need to go to the DB Server and check the version in installed DBMS package and the process may depend on the OS in use (Linux/Unix or Windows)
UPDATE: If it is MS-SQL Server then you may run the SQL command -
SELECT @@VERSION
or
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
to get the version and other details of DB server.
For IIS: Go to the CM Server and open the IIS Manager and from Help menu choose the About IIS as shown below:

In Addition, each Windows comes with its own IIS and if you know the OS version, then getting the IIS version is fun. Below is the mapping table: (NOTE: per my kowledge, post Windows Server 2000, IIS can not be upgraded without upgrading the OS)
- Windows Server 2000 - IIS 5.0
- Windows XP Professional - IIS 5.1
- Windows Server 2003 - IIS 6.0
- Windows Vista - IIS 7.0
- Windows Server 2008 - IIS 7.0
- Windows Server 2008 R2 - IIS 7.5
- Windows 7 - IIS 7.5
- Windows Server 2012 - IIS 8.0
- Windows 8 - IIS 8.0