One way to do this is to rewrite the objective somewhat.
I'm going to start from an objective of the following form:
$$ \min_x c(\zeta)^\top x, $$
with $c(\zeta)$ a cost vector depending on a random vector $\zeta$ with known probability distribution, and $x$ a decision vector, both of suitable dimension.
Now, the problem using $\zeta$ directly is that the support of its probability distribution could be very large. Instead, we can sample a representative set of $n \in \mathbb{N}$ realisations $\zeta_1, \zeta_2, \ldots, \zeta_n$ from the probability distribution of $\zeta$.
If these samples adequately capture the randomness in $\zeta$, the resulting sampling solution should also be close to the optimal solution had we used $\zeta$ directly.
We can restate the sampling objective using an epigraph formulation, as
$$ \min_{x, t} t $$
with $t \in \mathbb{R}$, subject to
$$ t \ge c(\zeta_i)^\top x, \qquad i = 1, 2, \ldots, n. $$
Using binary variables $z_i \in \{0, 1\}$ for $i = 1,\ldots, n$, we can rewrite this to add the condition that a fraction $\alpha \in [0,1]$ of these constraints may be violated:
\begin{align} \textstyle
\sum_{i = 1}^n z_i &\le \alpha n, \\
t &\ge c(\zeta_i)^\top x - Mz_i \qquad i = 1, 2, \ldots, n,
\end{align}
for some $M$ big enough. A concrete value for $M$ could be the objective value you get when optimising with $M = \alpha = 0$.
For the $0.75$ quantile, set $\alpha = 0.25$.