How do I list all installed packages with specific version numbers?

Use dpkg -l instead.

Example:

dpkg -l | grep '^ii' | grep skype

Outputs this:

alaa@aa-lu:~$ dpkg -l | grep '^ii' | grep skype
ii    skype      4.2.0.11-0ubuntu0.12.04.2       i386     client for Skype VOIP...

If you only want to extract the name and version, you can do this:

dpkg -l | grep '^ii' | grep skype | awk '{print $2 "\t" $3}'

Which will only print the second and third column from the above output, like this:

alaa@aa-lu:~$ dpkg -l | grep '^ii' | grep skype | awk '{print $2 "\t" $3}'
skype   4.2.0.11-0ubuntu0.12.04.2

Of course, if you want to list all of your installed packages with their versions, and not only Skype, then just remove the grep skype part to make the command like this:

dpkg -l | grep '^ii' | awk '{print $2 "\t" $3}'

Use

dpkg-query --show apache2

to get the version number for package apache2 and

dpkg-query --show 

to get the version numbers for all installed packages