how to translate countries output from wp database?

you need to have the actual translations somewhere in a .mo file. for your plugin / theme.

1) when you setup the codes, you can also “mark them for translation”
http://codex.wordpress.org/I18n_for_WordPress_Developers#Marking_Strings_for_Translation

2) create the translations for the languages somehow – various tools. eg this one:
http://wordpress.org/extend/plugins/codestyling-localization/

3) in your plugin must tell wp to load the translation ‘domain’
http://codex.wordpress.org/I18n_for_WordPress_Developers#Choosing_and_loading_a_domain

4) then to get the translation reference the domain in the call

__(‘String’, ‘your_domain’)

Note:
There are various ‘country’ or multi language plugins that may have country translations already – try searching the wp plugins db. You could ‘copy’ their .mo and .po files if you did not want their plugin active. (you’d use their domain if you were not copying).