Create a directory at the root named MyScripts.

Create the PrintField.inc.php file here
Paste following code into the PrintField.inc.php file
<?php
$server="localhost";
$username="name";
$passwort="password";
$dbname="database-name";
$FieldID="73";
/////////////////////////////////////////////////////////////////////////////////////////
//Set connection with database
$connection = mysqli_connect($server,$username,$passwort);
if (!$connection) die ("Not connected with MySQL");
$table=mysqli_select_db($connection, $dbname);
mysqli_query($connection, "set names utf8");
if(!@table) die ("Not connected to database.");
/////////////////////////////////////////////////////////////////////////////////////////
//Get ticket ID from osTicket
$TicketID = $ticket->getId();
//Read value from table ost_form_entry into variable
if(!$result = mysqli_query($connection, "SELECT * FROM ost_form_entry WHERE object_id=\"$TicketID\"")) {echo "<h2>Not connected with table ost_form_entry.</h2>\n"; }
while($ost_form_entry = mysqli_fetch_array($result))
{
$EntryID = $ost_form_entry["id"];
}
//Read value from table ost_form_entry_values into variable
if(!$result = mysqli_query($connection, "SELECT * FROM ost_form_entry_values WHERE entry_id=\"$EntryID\" AND field_id=\"$FieldID\"")) {echo "<h2>Not connected with table ost_form_entry_values.</h2>\n"; }
while($ost_form_entry_values = mysqli_fetch_array($result))
{
$EntryValue = $ost_form_entry_values["value"];
}
mysqli_close($connection);
/////////////////////////////////////////////////////////////////////////////////////////
//Display in ticket-print.tmpl.php
?>
<tr>
<th><?php echo __('Your value'); ?></th>
<td><?php echo $EntryValue; ?></td>
</tr>
Edit the lines at the beginning of the file as needed.
Add
<?php include(ROOT_DIR.'MyScripts/PrintField.inc.php'); ?>
to the file \include\staff\templates\ticket-print.tmpl.php