You can restore a database from two previous versions of SQL Server.
So SQL 2014 can restore a database from SQl2012 or SQL2008 and either SQL2008, or SQL2012, can restore a backup from SQL2005.
Thus you need to install either SQL2008 or SQL2012, restore a backup from SQL2005 (or upgrade the server the database(s) are one) and then backup and repeat again for SQL2014.