The short answer is yes, Asterisk can do this. Asterisk can access a MySQL database to extract information in a dialplan. In addition you can either play mp3 (or wav or gsm) files as you suggest or Asterisk with the correct plugins can perform text to speech translation.
please see here: astertools.com
if you download the asterLive iso, you can setup such solution within minutes inside the WEB GUI of IVAN, you can use the solution for free if you do not have the needs of more than one concurrent call.